Macros can be defined like
<$MACRO MacroName [ flags ] [ attributes ] >

...macro text...

/$MACRO
Here are some examples of macro definitions:

Use as a shortcut

You can define a macro called MyAddress that only is a shortcut for your email-address like <$INCLUDE FILE="exmpl/m_addr.hsc" SOURCE PRE> <* show macro *> <$INCLUDE FILE="exmpl/m_addr.hsc"> <* define macro *> So every time, you insert the macro-tag MyAddress in your hsc-source, it will be replaced by

in the HTML-object.

Create your own logical style

One of the most embarassing facts within HTML are physical/logical styles. Taking a look at the HTML 3.0 proposed things, you find loads of new styles: AU for authors, SAMP for sequences of litteral characters and so on... No one knows where this will end, and I'm just waiting for logical styles like TIM_BERNERS_LEE_S_LOGICAL_STYLE_TO_RENDER_THE_NAME_OF_HIS_DOG. (Which would asume that TBL has a dog)

Anyway, while other people think about which logical style should get his own tag and which not, you can define your own styles. For example, a logical style to render a filename could look like this: <$INCLUDE FILE="exmpl/m_file.hsc" SOURCE PRE> <* show macro *> <* is already defined within "inc/macro.hsc", ** so there is no need to include redefine it here *> Your new style can be used like all other styles: <$source PRE> ..open the file hugo.txt and.. In this case, filenames will be rendered italic:
..open the file hugo.txt and..

This seems much more reasonable to me then producing heaps of logical styles, but..

Note that you just created a container that requires an start- and end-tag.

Macros with custom attributes

Take a look at this example: <$INCLUDE FILE="exmpl/m_next.hsc" SOURCE PRE> <* show macro *> <$INCLUDE FILE="exmpl/m_next.hsc"> <* define macro *> This defines a macro that defines a button that references to the next page. As every page has its own next page, you can set one attribute for this macro: NXTREF, which is the URI that should be referenced as the "next" page.

So an example usage of this macro would be: <$source PRE> which will give the button seen below:

Note that the value of NXTREF is passed to the HREF attribute within the A tag when the macro is extracted.

If you wonder, what HREF=(NxtRef) (see above) should mean: This sets HREF with the value stored in NxtRef. For details, read the section about expressions.

Some Notes

Names for macros and attributes are case-insensitive.

Macro attributes can only be defined within opening macros. The coresponding closing macro automatically inherits all attributes of its opening macro. This seems more HTML-like to me.

SGML is able to handle macros.

To make your macros more powerful and flexible, you can use expressions and conditional conversion.